<template>
  <div>
    <h1>生命周期</h1>
  </div>
</template>

<script>
import { onMounted } from 'vue'
export default {
  setup () {
    onMounted(() => {
      console.log('vue3-onMounted组件挂载执行：')
    })
    return {}
  },
  mounted () {
    console.log('vue2-mounted')
  }
}
</script>

<style lang="scss" scoped>

</style>
